package com.happy_lab_management.demo.common.weekday.controller;

import com.happy_lab_management.demo.common.section.service.SectionService;
import com.happy_lab_management.demo.common.weekday.service.WeekdayService;
import com.happy_lab_management.entity.Section;
import com.happy_lab_management.entity.Weekday;
import com.happy_lab_management.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/common/weekday")
public class weekdayController {


    @Autowired
    private WeekdayService weekdayService;
    @RequestMapping("/list")
    public Result<List<Weekday>> list(){
        List<Weekday> weekday = weekdayService.list();
        return Result.success(weekday);
    }

}